#include<stdio.h>
int main()
{
	int i,j,y=0,Sum=0;
	scanf("%d %d",&i,&j);
	for(;i<=j;Sum+=i,i++)
	{
		printf("%5d",i);
		if(++y%5==0&&i!=j)
		printf("\n");
	}
    printf("\nSum = %d",Sum);
	return 0;
}
